<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>增加二维码信息</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="../../../elementUI/index.css">
  <link rel="stylesheet" href="../../../css/index.css">
</head>

<body>
  <div id="app" class="minWidth">
    <el-form :model="form" ref="contract" :rules="rules" inline-message="true" style="width: 100%">
      <div class="table_titel">
        <div class="titel">增加二维码</div>
      </div>
      <el-descriptions :column="2" border size="small">
        <el-descriptions-item label="二维码">
          <el-form-item prop="Group_OR_Code_Name">
            <el-input v-model.trim="form.Group_OR_Code_Name" placeholder="二维码名称"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="二维码类型">
          <el-form-item prop="Group_OR_Code_Type">
            <el-radio v-model="form.Group_OR_Code_Type" label="0">地址</el-radio>
            <el-radio v-model="form.Group_OR_Code_Type" label="1">图片</el-radio>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item v-if="form.Group_OR_Code_Type=='0'" label="二维码地址">
          <el-form-item prop="Url">
            <el-input v-model.trim="form.Url" placeholder="二维码地址"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item v-else label="二维码图片">
          <el-form-item prop="Url">
            <div>
              <div v-show="form.Url">
                <el-image class="el-upload-list__item-thumbnail" style="width: 148px; height: 148px"
                  :src="DomainIMG + form.Url" fit="contain"></el-image>
                <span class="el-upload-list__item-actions">
                  <span @click="handlePictureCardPreview(DomainIMG + form.Url)"><i class="el-icon-zoom-in"></i></span>
                  <span @click="handleRemove('front')"><i class="el-icon-delete"></i></span>
                </span>
              </div>
              <el-upload v-show="!form.Url" class="upload-demo" :show-file-list="false" list-type="picture-card"
                action="" accept="image/*" :before-upload="uploadFront">
                <i slot="default" class="el-icon-plus"></i>
                <div class="el-upload__tip" slot="tip">上传正方形图片，且大小不超过120k</div>
              </el-upload>
            </div>
          </el-form-item>
        </el-descriptions-item>
      </el-descriptions>
      <el-form-item class="form-operation">
        <el-button @click="window.history.back()">返回</el-button>
        <el-button type="primary" :loading="loading" @click="submitForm('contract')">提交</el-button>
      </el-form-item>
    </el-form>
  </div>
  <script type="text/javascript" src="../../../js/jquery-3.6.0.min.js"></script>
  <script type="text/javascript" src="../../../js/jquery.cookie.js"></script>
  <script type="text/javascript" src="../../../js/vue.min.js"></script>
  <script type="text/javascript" src="../../../elementUI/index.js"></script>
  <script type="text/javascript" src="../../../js/utils.js"></script>
  <script type="text/javascript" src="../../../js/ID_Validity.js"></script>
  <script type="text/javascript" src="../../../js/compressor.js"></script>
  <script type="text/javascript" src="./js/Add.js"></script>
</body>

</html>